<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="description" content="API docs for the SpriteWidget class from the spritewidget library, for the Dart programming language.">
  <title>SpriteWidget class - spritewidget library - Dart API</title>
  <!-- required because all the links are pseudo-absolute -->
  <base href="..">

  <link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500,400i,400,300|Source+Sans+Pro:400,300,700" rel="stylesheet">
  <link rel="stylesheet" href="static-assets/github.css">
  <link rel="stylesheet" href="static-assets/styles.css">
  <link rel="icon" href="static-assets/favicon.png">

</head>

<body>

<div id="overlay-under-drawer"></div>

<header id="title">
  <button id="sidenav-left-toggle" type="button">&nbsp;</button>
  <ol class="breadcrumbs gt-separated dark hidden-xs">
    <li><a href="index.html">spritewidget</a></li>
    <li><a href="spritewidget/spritewidget-library.html">spritewidget</a></li>
    <li class="self-crumb">SpriteWidget class</li>
  </ol>
  <div class="self-name">SpriteWidget</div>
  <form class="search navbar-right" role="search">
    <input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
</header>

<main>

  <div class="col-xs-6 col-sm-3 col-md-2 sidebar sidebar-offcanvas-left">
    <h5>spritewidget library</h5>
    <ol>
      <li class="section-title"><a href="spritewidget/spritewidget-library.html#classes">Classes</a></li>
      <li><a href="spritewidget/Action-class.html">Action</a></li>
      <li><a href="spritewidget/ActionCallFunction-class.html">ActionCallFunction</a></li>
      <li><a href="spritewidget/ActionController-class.html">ActionController</a></li>
      <li><a href="spritewidget/ActionDelay-class.html">ActionDelay</a></li>
      <li><a href="spritewidget/ActionGroup-class.html">ActionGroup</a></li>
      <li><a href="spritewidget/ActionInstant-class.html">ActionInstant</a></li>
      <li><a href="spritewidget/ActionInterval-class.html">ActionInterval</a></li>
      <li><a href="spritewidget/ActionRemoveNode-class.html">ActionRemoveNode</a></li>
      <li><a href="spritewidget/ActionRepeat-class.html">ActionRepeat</a></li>
      <li><a href="spritewidget/ActionRepeatForever-class.html">ActionRepeatForever</a></li>
      <li><a href="spritewidget/ActionSequence-class.html">ActionSequence</a></li>
      <li><a href="spritewidget/ActionSpline-class.html">ActionSpline</a></li>
      <li><a href="spritewidget/ActionTween-class.html">ActionTween</a></li>
      <li><a href="spritewidget/ColorSequence-class.html">ColorSequence</a></li>
      <li><a href="spritewidget/Constraint-class.html">Constraint</a></li>
      <li><a href="spritewidget/ConstraintPositionToNode-class.html">ConstraintPositionToNode</a></li>
      <li><a href="spritewidget/ConstraintRotationToMovement-class.html">ConstraintRotationToMovement</a></li>
      <li><a href="spritewidget/ConstraintRotationToNode-class.html">ConstraintRotationToNode</a></li>
      <li><a href="spritewidget/ConstraintRotationToNodeRotation-class.html">ConstraintRotationToNodeRotation</a></li>
      <li><a href="spritewidget/EffectLine-class.html">EffectLine</a></li>
      <li><a href="spritewidget/GameMath-class.html">GameMath</a></li>
      <li><a href="spritewidget/ImageMap-class.html">ImageMap</a></li>
      <li><a href="spritewidget/Label-class.html">Label</a></li>
      <li><a href="spritewidget/Layer-class.html">Layer</a></li>
      <li><a href="spritewidget/NineSliceSprite-class.html">NineSliceSprite</a></li>
      <li><a href="spritewidget/Node-class.html">Node</a></li>
      <li><a href="spritewidget/Node3D-class.html">Node3D</a></li>
      <li><a href="spritewidget/NodeWithSize-class.html">NodeWithSize</a></li>
      <li><a href="spritewidget/ParticleSystem-class.html">ParticleSystem</a></li>
      <li><a href="spritewidget/Sprite-class.html">Sprite</a></li>
      <li><a href="spritewidget/SpriteBox-class.html">SpriteBox</a></li>
      <li><a href="spritewidget/SpriteBoxEvent-class.html">SpriteBoxEvent</a></li>
      <li><a href="spritewidget/SpritePaint-class.html">SpritePaint</a></li>
      <li><a href="spritewidget/SpriteSheet-class.html">SpriteSheet</a></li>
      <li><a href="spritewidget/SpriteTexture-class.html">SpriteTexture</a></li>
      <li><a href="spritewidget/SpriteWidget-class.html">SpriteWidget</a></li>
      <li><a href="spritewidget/TexturedLine-class.html">TexturedLine</a></li>
      <li><a href="spritewidget/TexturedLinePainter-class.html">TexturedLinePainter</a></li>
      <li><a href="spritewidget/VirtualJoystick-class.html">VirtualJoystick</a></li>
    
    
    
      <li class="section-title"><a href="spritewidget/spritewidget-library.html#functions">Functions</a></li>
      <li><a href="spritewidget/convertDegrees2Radians.html">convertDegrees2Radians</a></li>
      <li><a href="spritewidget/convertRadians2Degrees.html">convertRadians2Degrees</a></li>
      <li><a href="spritewidget/deserializeBlendMode.html">deserializeBlendMode</a></li>
      <li><a href="spritewidget/deserializeColor.html">deserializeColor</a></li>
      <li><a href="spritewidget/deserializeColorSequence.html">deserializeColorSequence</a></li>
      <li><a href="spritewidget/deserializeOffset.html">deserializeOffset</a></li>
      <li><a href="spritewidget/deserializeParticleSystem.html">deserializeParticleSystem</a></li>
      <li><a href="spritewidget/randomBool.html">randomBool</a></li>
      <li><a href="spritewidget/randomDouble.html">randomDouble</a></li>
      <li><a href="spritewidget/randomInt.html">randomInt</a></li>
      <li><a href="spritewidget/randomSignedDouble.html">randomSignedDouble</a></li>
      <li><a href="spritewidget/serializeBlendMode.html">serializeBlendMode</a></li>
      <li><a href="spritewidget/serializeColor.html">serializeColor</a></li>
      <li><a href="spritewidget/serializeColorSequence.html">serializeColorSequence</a></li>
      <li><a href="spritewidget/serializeOffset.html">serializeOffset</a></li>
      <li><a href="spritewidget/serializeParticleSystem.html">serializeParticleSystem</a></li>
    
      <li class="section-title"><a href="spritewidget/spritewidget-library.html#enums">Enums</a></li>
      <li><a href="spritewidget/EffectLineAnimationMode-class.html">EffectLineAnimationMode</a></li>
      <li><a href="spritewidget/EffectLineWidthMode-class.html">EffectLineWidthMode</a></li>
      <li><a href="spritewidget/SpriteBoxTransformMode-class.html">SpriteBoxTransformMode</a></li>
    
      <li class="section-title"><a href="spritewidget/spritewidget-library.html#typedefs">Typedefs</a></li>
      <li><a href="spritewidget/ActionCallback.html">ActionCallback</a></li>
      <li><a href="spritewidget/PointSetterCallback.html">PointSetterCallback</a></li>
      <li><a href="spritewidget/SetterCallback.html">SetterCallback</a></li>
    
    </ol>
  </div>

  <div class="col-xs-12 col-sm-9 col-md-8 main-content">
    <h1>SpriteWidget class</h1>

    <section class="desc markdown">
      <p>A widget that uses a <a href="spritewidget/SpriteBox-class.html">SpriteBox</a> to render a sprite node tree to the screen.</p>
    </section>
    

    <section class="summary offset-anchor" id="constructors">
      <h2>Constructors</h2>

      <dl class="constructor-summary-list">
        <dt id="SpriteWidget" class="callable">
          <span class="name"><a href="spritewidget/SpriteWidget/SpriteWidget.html">SpriteWidget</a></span><span class="signature">(<span class="parameter" id="-param-rootNode"><span class="type-annotation"><a href="spritewidget/NodeWithSize-class.html">NodeWithSize</a></span> <span class="parameter-name">rootNode</span>, [</span> <span class="parameter" id="-param-transformMode"><span class="type-annotation"><a href="spritewidget/SpriteBoxTransformMode-class.html">SpriteBoxTransformMode</a></span> <span class="parameter-name">transformMode</span> = <span class="default-value">SpriteBoxTransformMode.letterbox</span></span> ])</span>
        </dt>
        <dd>
          Creates a new sprite widget with <code>rootNode</code> as its content. <a href="spritewidget/SpriteWidget/SpriteWidget.html">[...]</a>
        </dd>
      </dl>
    </section>

    <section class="summary offset-anchor" id="instance-properties">
      <h2>Properties</h2>

      <dl class="properties">
        <dt id="rootNode" class="property">
          <span class="name"><a href="spritewidget/SpriteWidget/rootNode.html">rootNode</a></span>
          <span class="signature">&#8594; <a href="spritewidget/NodeWithSize-class.html">NodeWithSize</a></span>
        </dt>
        <dd>
          The rootNode of the sprite node tree. <a href="spritewidget/SpriteWidget/rootNode.html">[...]</a>
          <div class="features">final</div>
</dd>
        <dt id="transformMode" class="property">
          <span class="name"><a href="spritewidget/SpriteWidget/transformMode.html">transformMode</a></span>
          <span class="signature">&#8594; <a href="spritewidget/SpriteBoxTransformMode-class.html">SpriteBoxTransformMode</a></span>
        </dt>
        <dd>
          The transform mode used to fit the sprite node tree to the size of the widget.
          <div class="features">final</div>
</dd>
        <dt id="child" class="property inherited">
          <span class="name"><a href="spritewidget/SpriteWidget/child.html">child</a></span>
          <span class="signature">&#8594; Widget</span>
        </dt>
        <dd class="inherited">
          The widget below this widget in the tree. <a href="spritewidget/SpriteWidget/child.html">[...]</a>
          <div class="features">final, inherited</div>
</dd>
        <dt id="hashCode" class="property inherited">
          <span class="name"><a href="dart-core/Object/hashCode.html">hashCode</a></span>
          <span class="signature">&#8594; <a href="dart-core/int-class.html">int</a></span>
        </dt>
        <dd class="inherited">
          The hash code for this object. <a href="dart-core/Object/hashCode.html">[...]</a>
          <div class="features">read-only, inherited</div>
</dd>
        <dt id="key" class="property inherited">
          <span class="name"><a href="spritewidget/SpriteWidget/key.html">key</a></span>
          <span class="signature">&#8594; Key</span>
        </dt>
        <dd class="inherited">
          Controls how one widget replaces another widget in the tree. <a href="spritewidget/SpriteWidget/key.html">[...]</a>
          <div class="features">final, inherited</div>
</dd>
        <dt id="runtimeType" class="property inherited">
          <span class="name"><a href="dart-core/Object/runtimeType.html">runtimeType</a></span>
          <span class="signature">&#8594; <a href="dart-core/Type-class.html">Type</a></span>
        </dt>
        <dd class="inherited">
          A representation of the runtime type of the object.
          <div class="features">read-only, inherited</div>
</dd>
      </dl>
    </section>

    <section class="summary offset-anchor" id="instance-methods">
      <h2>Methods</h2>
      <dl class="callables">
        <dt id="createRenderObject" class="callable">
          <span class="name"><a href="spritewidget/SpriteWidget/createRenderObject.html">createRenderObject</a></span><span class="signature">(<wbr><span class="parameter" id="createRenderObject-param-context"><span class="type-annotation">BuildContext</span> <span class="parameter-name">context</span></span>)
            <span class="returntype parameter">&#8594; <a href="spritewidget/SpriteBox-class.html">SpriteBox</a></span>
          </span>
        </dt>
        <dd>
          Creates an instance of the <code>RenderObject</code> class that this
<code>RenderObjectWidget</code> represents, using the configuration described by this
<code>RenderObjectWidget</code>. <a href="spritewidget/SpriteWidget/createRenderObject.html">[...]</a>
          
</dd>
        <dt id="updateRenderObject" class="callable">
          <span class="name"><a href="spritewidget/SpriteWidget/updateRenderObject.html">updateRenderObject</a></span><span class="signature">(<wbr><span class="parameter" id="updateRenderObject-param-context"><span class="type-annotation">BuildContext</span> <span class="parameter-name">context</span>, </span> <span class="parameter" id="updateRenderObject-param-renderObject"><span class="type-annotation"><a href="spritewidget/SpriteBox-class.html">SpriteBox</a></span> <span class="parameter-name">renderObject</span></span>)
            <span class="returntype parameter">&#8594; void</span>
          </span>
        </dt>
        <dd>
          Copies the configuration described by this <code>RenderObjectWidget</code> to the
given <code>RenderObject</code>, which will be of the same type as returned by this
object's <a href="spritewidget/SpriteWidget/createRenderObject.html">createRenderObject</a>. <a href="spritewidget/SpriteWidget/updateRenderObject.html">[...]</a>
          
</dd>
        <dt id="createElement" class="callable inherited">
          <span class="name"><a href="spritewidget/SpriteWidget/createElement.html">createElement</a></span><span class="signature">(<wbr>)
            <span class="returntype parameter">&#8594; SingleChildRenderObjectElement</span>
          </span>
        </dt>
        <dd class="inherited">
          RenderObjectWidgets always inflate to a <code>RenderObjectElement</code> subclass.
          <div class="features">inherited</div>
</dd>
        <dt id="debugDescribeChildren" class="callable inherited">
          <span class="name"><a href="spritewidget/SpriteWidget/debugDescribeChildren.html">debugDescribeChildren</a></span><span class="signature">(<wbr>)
            <span class="returntype parameter">&#8594; <a href="dart-core/List-class.html">List</a><span class="signature">&lt;<wbr><span class="type-parameter">DiagnosticsNode</span>&gt;</span></span>
          </span>
        </dt>
        <dd class="inherited">
          Returns a list of <code>DiagnosticsNode</code> objects describing this node's
children. <a href="spritewidget/SpriteWidget/debugDescribeChildren.html">[...]</a>
          <div class="features">@protected, inherited</div>
</dd>
        <dt id="debugFillProperties" class="callable inherited">
          <span class="name"><a href="spritewidget/SpriteWidget/debugFillProperties.html">debugFillProperties</a></span><span class="signature">(<wbr><span class="parameter" id="debugFillProperties-param-properties"><span class="type-annotation">DiagnosticPropertiesBuilder</span> <span class="parameter-name">properties</span></span>)
            <span class="returntype parameter">&#8594; void</span>
          </span>
        </dt>
        <dd class="inherited">
          Add additional properties associated with the node. <a href="spritewidget/SpriteWidget/debugFillProperties.html">[...]</a>
          <div class="features">inherited</div>
</dd>
        <dt id="didUnmountRenderObject" class="callable inherited">
          <span class="name"><a href="spritewidget/SpriteWidget/didUnmountRenderObject.html">didUnmountRenderObject</a></span><span class="signature">(<wbr><span class="parameter" id="didUnmountRenderObject-param-renderObject"><span class="type-annotation">RenderObject</span> <span class="parameter-name">renderObject</span></span>)
            <span class="returntype parameter">&#8594; void</span>
          </span>
        </dt>
        <dd class="inherited">
          A render object previously associated with this widget has been removed
from the tree. The given <code>RenderObject</code> will be of the same type as
returned by this object's <a href="spritewidget/SpriteWidget/createRenderObject.html">createRenderObject</a>.
          <div class="features">@protected, inherited</div>
</dd>
        <dt id="noSuchMethod" class="callable inherited">
          <span class="name"><a href="dart-core/Object/noSuchMethod.html">noSuchMethod</a></span><span class="signature">(<wbr><span class="parameter" id="noSuchMethod-param-invocation"><span class="type-annotation"><a href="dart-core/Invocation-class.html">Invocation</a></span> <span class="parameter-name">invocation</span></span>)
            <span class="returntype parameter">&#8594; dynamic</span>
          </span>
        </dt>
        <dd class="inherited">
          Invoked when a non-existent method or property is accessed. <a href="dart-core/Object/noSuchMethod.html">[...]</a>
          <div class="features">inherited</div>
</dd>
        <dt id="toDiagnosticsNode" class="callable inherited">
          <span class="name"><a href="spritewidget/SpriteWidget/toDiagnosticsNode.html">toDiagnosticsNode</a></span><span class="signature">(<wbr>{<span class="parameter" id="toDiagnosticsNode-param-name"><span class="type-annotation"><a href="dart-core/String-class.html">String</a></span> <span class="parameter-name">name</span>, </span> <span class="parameter" id="toDiagnosticsNode-param-style"><span class="type-annotation">DiagnosticsTreeStyle</span> <span class="parameter-name">style</span></span> })
            <span class="returntype parameter">&#8594; DiagnosticsNode</span>
          </span>
        </dt>
        <dd class="inherited">
          Returns a debug representation of the object that is used by debugging
tools and by <a href="spritewidget/SpriteWidget/toStringDeep.html">toStringDeep</a>. <a href="spritewidget/SpriteWidget/toDiagnosticsNode.html">[...]</a>
          <div class="features">inherited</div>
</dd>
        <dt id="toString" class="callable inherited">
          <span class="name"><a href="spritewidget/SpriteWidget/toString.html">toString</a></span><span class="signature">(<wbr>{<span class="parameter" id="toString-param-minLevel"><span class="type-annotation">DiagnosticLevel</span> <span class="parameter-name">minLevel</span>: <span class="default-value">DiagnosticLevel.debug</span></span> })
            <span class="returntype parameter">&#8594; <a href="dart-core/String-class.html">String</a></span>
          </span>
        </dt>
        <dd class="inherited">
          Returns a string representation of this object.
          <div class="features">inherited</div>
</dd>
        <dt id="toStringDeep" class="callable inherited">
          <span class="name"><a href="spritewidget/SpriteWidget/toStringDeep.html">toStringDeep</a></span><span class="signature">(<wbr>{<span class="parameter" id="toStringDeep-param-prefixLineOne"><span class="type-annotation"><a href="dart-core/String-class.html">String</a></span> <span class="parameter-name">prefixLineOne</span>: <span class="default-value">''</span>, </span> <span class="parameter" id="toStringDeep-param-prefixOtherLines"><span class="type-annotation"><a href="dart-core/String-class.html">String</a></span> <span class="parameter-name">prefixOtherLines</span>, </span> <span class="parameter" id="toStringDeep-param-minLevel"><span class="type-annotation">DiagnosticLevel</span> <span class="parameter-name">minLevel</span>: <span class="default-value">DiagnosticLevel.debug</span></span> })
            <span class="returntype parameter">&#8594; <a href="dart-core/String-class.html">String</a></span>
          </span>
        </dt>
        <dd class="inherited">
          Returns a string representation of this node and its descendants. <a href="spritewidget/SpriteWidget/toStringDeep.html">[...]</a>
          <div class="features">inherited</div>
</dd>
        <dt id="toStringShallow" class="callable inherited">
          <span class="name"><a href="spritewidget/SpriteWidget/toStringShallow.html">toStringShallow</a></span><span class="signature">(<wbr>{<span class="parameter" id="toStringShallow-param-joiner"><span class="type-annotation"><a href="dart-core/String-class.html">String</a></span> <span class="parameter-name">joiner</span>: <span class="default-value">', '</span>, </span> <span class="parameter" id="toStringShallow-param-minLevel"><span class="type-annotation">DiagnosticLevel</span> <span class="parameter-name">minLevel</span>: <span class="default-value">DiagnosticLevel.debug</span></span> })
            <span class="returntype parameter">&#8594; <a href="dart-core/String-class.html">String</a></span>
          </span>
        </dt>
        <dd class="inherited">
          Returns a one-line detailed description of the object. <a href="spritewidget/SpriteWidget/toStringShallow.html">[...]</a>
          <div class="features">inherited</div>
</dd>
        <dt id="toStringShort" class="callable inherited">
          <span class="name"><a href="spritewidget/SpriteWidget/toStringShort.html">toStringShort</a></span><span class="signature">(<wbr>)
            <span class="returntype parameter">&#8594; <a href="dart-core/String-class.html">String</a></span>
          </span>
        </dt>
        <dd class="inherited">
          A short, textual description of this widget.
          <div class="features">inherited</div>
</dd>
      </dl>
    </section>

    <section class="summary offset-anchor inherited" id="operators">
      <h2>Operators</h2>
      <dl class="callables">
        <dt id="operator ==" class="callable inherited">
          <span class="name"><a href="dart-core/Object/operator_equals.html">operator ==</a></span><span class="signature">(<wbr><span class="parameter" id="==-param-other"><span class="type-annotation">dynamic</span> <span class="parameter-name">other</span></span>)
            <span class="returntype parameter">&#8594; <a href="dart-core/bool-class.html">bool</a></span>
          </span>
        </dt>
        <dd class="inherited">
          The equality operator. <a href="dart-core/Object/operator_equals.html">[...]</a>
          <div class="features">inherited</div>
</dd>
      </dl>
    </section>




  </div> <!-- /.main-content -->

  <div class="col-xs-6 col-sm-6 col-md-2 sidebar sidebar-offcanvas-right">
    <ol>
      <li class="section-title"><a href="spritewidget/SpriteWidget-class.html#constructors">Constructors</a></li>
      <li><a href="spritewidget/SpriteWidget/SpriteWidget.html">SpriteWidget</a></li>
    
      <li class="section-title">
        <a href="spritewidget/SpriteWidget-class.html#instance-properties">Properties</a>
      </li>
      <li><a href="spritewidget/SpriteWidget/rootNode.html">rootNode</a></li>
      <li><a href="spritewidget/SpriteWidget/transformMode.html">transformMode</a></li>
      <li class="inherited"><a href="spritewidget/SpriteWidget/child.html">child</a></li>
      <li class="inherited"><a href="dart-core/Object/hashCode.html">hashCode</a></li>
      <li class="inherited"><a href="spritewidget/SpriteWidget/key.html">key</a></li>
      <li class="inherited"><a href="dart-core/Object/runtimeType.html">runtimeType</a></li>
    
      <li class="section-title"><a href="spritewidget/SpriteWidget-class.html#instance-methods">Methods</a></li>
      <li><a href="spritewidget/SpriteWidget/createRenderObject.html">createRenderObject</a></li>
      <li><a href="spritewidget/SpriteWidget/updateRenderObject.html">updateRenderObject</a></li>
      <li class="inherited"><a href="spritewidget/SpriteWidget/createElement.html">createElement</a></li>
      <li class="inherited"><a href="spritewidget/SpriteWidget/debugDescribeChildren.html">debugDescribeChildren</a></li>
      <li class="inherited"><a href="spritewidget/SpriteWidget/debugFillProperties.html">debugFillProperties</a></li>
      <li class="inherited"><a href="spritewidget/SpriteWidget/didUnmountRenderObject.html">didUnmountRenderObject</a></li>
      <li class="inherited"><a href="dart-core/Object/noSuchMethod.html">noSuchMethod</a></li>
      <li class="inherited"><a href="spritewidget/SpriteWidget/toDiagnosticsNode.html">toDiagnosticsNode</a></li>
      <li class="inherited"><a href="spritewidget/SpriteWidget/toString.html">toString</a></li>
      <li class="inherited"><a href="spritewidget/SpriteWidget/toStringDeep.html">toStringDeep</a></li>
      <li class="inherited"><a href="spritewidget/SpriteWidget/toStringShallow.html">toStringShallow</a></li>
      <li class="inherited"><a href="spritewidget/SpriteWidget/toStringShort.html">toStringShort</a></li>
    
      <li class="section-title inherited"><a href="spritewidget/SpriteWidget-class.html#operators">Operators</a></li>
      <li class="inherited"><a href="dart-core/Object/operator_equals.html">operator ==</a></li>
    
    
    
    </ol>
  </div><!--/.sidebar-offcanvas-->

</main>

<footer>
  <span class="no-break">
    spritewidget 0.9.16
  </span>

</footer>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="static-assets/typeahead.bundle.min.js"></script>
<script src="static-assets/highlight.pack.js"></script>
<script src="static-assets/URI.js"></script>
<script src="static-assets/script.js"></script>


</body>

</html>
